<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/pages/safeai/jsp/common/taglibs.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>优惠券编辑页面</title>
<link href="${ctx}/css/safeai/together.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function chen112(obj){
		document.getElementsByName("type_name")[0].value = obj.options[obj.selectedIndex].text
		if(obj.selectedIndex!=0&&obj.selectedIndex!=1&&obj.selectedIndex!=2){
			document.getElementsByName("type_id_1")[0].style.display='';
		}else{
			document.getElementsByName("type_id_1")[0].style.display='none';
		}
	}
	function qewfq(obj){
		document.getElementsByName("type_name1")[0].value = obj.options[obj.selectedIndex].text
	}
</script>
</head>
<body>
<form action="${ctx}/product/salesList.do" id="ecouponForm" method="post">
<table align="center" width="600">
	<tr>
		<input type="hidden" name="method" value="add">
	    <th colspan="3" height="25px" class="td_01">添加排行</th>
    </tr>
	<tr>
		<th height="25px" class="td_01">排行名称</th>
		<th height="25px" class="td_01">商品名称</th>
		<th height="25px" class="td_01">前台显示顺序</th>
	</tr>
	<tr>
		<td class="td_03">
			<select name="type_id" onchange="chen112(this)">
    			<option value="1" selected="selected">数码单反</option>
    			<option value="2">便携数码相机</option>
    			<option value="3">镜头</option>
    			<option value="4">佳能</option>
    			<option value="5">尼康</option>
    			<option value="6">索尼</option>
    			<option value="7">适马</option>
    			<option value="8">腾龙</option>
    		</select>
    		<select name="type_id_1" style="display:none" onchange="qewfq(this)">
    			<option value="1" selected="selected">数码单反</option>
    			<option value="2">便携数码相机</option>
    			<option value="3">镜头</option>
    		</select>
    		
		</td>
		<td class="td_03">
			<input type="hidden" name="ecoupon.productid11" id="ecoupon.productid" value="${ecoupon.productid}">
	        <input type="text" name="product" size="12px" id="product" value="${productName}"/>&nbsp;&nbsp;
	    	<input type="button" value="搜索" class="btn" onclick="window.open('${ctx}/ecoupon.do?method=search&productname='+encodeURI(document.getElementById('product').value))"/>
		</td>
		<td class="td_03">
			<select name="seq">
				<option value="1">1</option>
				<option value="2">2</option>
				<option value="3">3</option>
				<option value="4">4</option>
				<option value="5">5</option>
				<option value="6">6</option>
				<option value="7">7</option>
				<option value="8">8</option>
				<option value="9">9</option>
				<option value="10">10</option>
			</select>
		</td>
	</tr>
	<tr>
		<td colspan="3" align="center"><input type="submit" class="btn" value="添加"></td>
	</tr>
</table>
<input type="hidden" value="数码单反" name="type_name">
<input type="hidden" value="数码单反" name="type_name1">
</form>
</body>
</html>
